var t = getApp();

Page({
    data: {
        language: "",
        goodList: []
    },
    onLoad: function(t) {
        t.level_id && this.setData({
            level_id: t.level_id
        }), this.getGoodData();
    },
    onReady: function() {
        var t = wx.getStorageSync("langIndex");
        this.setData({
            language: t.en
        });
    },
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    getGoodData: function() {
        var e = this, a = t.getNetAddresss("member.member-level.getLevelsGoods");
        t._getNetWork({
            url: a,
            data: {
                id: this.data.level_id
            },
            success: function(t) {
                var a = t.data;
                1 == a.result ? e.setData({
                    goodList: a.data
                }) : wx.showToast({
                    icon: "none",
                    title: a.msg,
                    duration: 1500
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    },
    buy: function(t) {
        var e = t.currentTarget.dataset.id;
        wx.navigateTo({
            url: "/packageA/detail_v2/detail_v2?id=" + e
        });
    }
});